#pragma once

#include "GameMapGrid.h"


class CGameMapGrid
	{
public:
	enum GridType
	{
		GRID_TYPE_ROAD			= 0,
		GRID_TYPE_OBSTACLE		= 1,
		GRID_TYPE_ENTRY			= 2,
		GRID_TYPE_EXPORT		= 3,
		GRID_TYPE_COUNT			= 4,
		GRID_TYPE_INVALID		= GRID_TYPE_COUNT,
	};
	enum NodeType
	{
		NODE_TYPE_INIT			= 0,
		NODE_TYPE_PATH			= 1,
		NODE_TYPE_COUNT,
	};
	struct CGridPos
	{
		int x;
		int y;
		CGridPos()
		{}
		CGridPos(int _x, int _y)
		{
			x = _x;
			y = _y;
		}
	};
public:
	enum DefaultValue
	{
		DEFAULT_GRID_SIZE		= 16,
	};
public:
	CGameMapGrid();
	CGameMapGrid(CGameMapGrid::GridType type);
	virtual ~CGameMapGrid(void);
public:
	void set_node_type(NodeType type) { m_eNodeType = type; }
	NodeType& get_node_type() { return m_eNodeType; }
	void set_grid_type(GridType type) { m_eType = type; }
	GridType& get_grid_type() { return m_eType; }
	void set_grid_pos(CGridPos pos) { m_GridPos = pos; }
	CGridPos& get_grid_pos() { return m_GridPos; }
public:
	void DrawBlock(CDC* pDrawDC, CRect rcBlock, BOOL bSelected);
	void DrawBlock(CDC* pDrawDC, CRect rcBlock);
private:
	CGridPos m_GridPos;
	GridType m_eType;
	NodeType m_eNodeType;
};
